<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>摆渡村-壁纸-首页</title>
    <link rel="stylesheet" th:href="@{/css/menu.css}">
    <link rel="stylesheet" th:href="@{/css/tab.css}">
    <link rel="stylesheet" th:href="@{/css/list.css}">
    <link rel="stylesheet" th:href="@{/css/page.css}">
    <link rel="stylesheet" th:href="@{/css/footer.css}">
    <script rel="script" th:src="@{/js/vue.js}"></script>
    <style>
        ::-webkit-scrollbar {display:none}
    </style>
</head>
<body>
<div id="app">

    <div class="nav">
        <div class="brand">
            <div class="brand-title">摆渡壁纸</div>
        </div>
        <div class="menu">
            <ul>
                <li><a th:href="@{/}">首页</a></li>
                <li><a th:href="@{/view}">浏览</a></li>
                <li><a th:href="@{/me}">我的</a></li>
            </ul>
        </div>
        <div class="user">
            <div th:if="${session.say}" class="user-login"><a th:href="@{/me}" th:text="${session.user.userNickname}">登录</a></div>
        </div>
    </div>

    <div class="tab" style="margin-top: 80px;">
        <div class="tab-context">
            <a th:each="type:${userView.wallTypes}" th:text="${type.wallTypeName}" th:href="@{'/view/1/'+${type.wallTypeName}}">风景</a>
        </div>
    </div>

    <div class="list" style="margin-top: 20px;">
        <div class="list-context">
            <div class="list-context-line" th:each="twv:${userView?.wallViews}">
                <a th:if="${twv.one} != null" th:href="@{'/image/'+${twv?.one?.id}}" class="image-context">
                    <img th:src="${twv?.one?.viewPath}" alt="img">
                </a>
                <a th:if="${twv.two} != null" th:href="@{'/image/'+${twv?.two?.id}}" class="image-context">
                    <img th:src="${twv?.two?.viewPath}" alt="img">
                </a>
                <a th:if="${twv.three} != null" th:href="@{'/image/'+${twv?.three?.id}}" class="image-context">
                    <img th:src="${twv?.three?.viewPath}" alt="img">
                </a>
            </div>
        </div>
    </div>

    <div class="page" style="margin-top: 10px;">
        <div class="page-context">
            <a th:href="@{${userView.fore}}">上一页</a>
            <a th:href="@{${userView.next}}">下一页</a>
        </div>
    </div>

    <div class="footer" style="margin-top: 80px;">
        <div class="footer-context">
            Copyright © 2020 摆渡壁纸 甘ICP备13013111号
        </div>
    </div>
</div>
<script type="application/javascript">
    let vm = new Vue({
        el: '#app',
        data: {
            nav: {
                display: {
                    logo: true
                }
            }
        }
    });
</script>
</body>
</html>